# coding=utf8
# 全世界最帅的帅哥
from comment.utils.serializers import BaseListSerializer


class BandCardListSerializer(BaseListSerializer):
    """
    银行卡列表数据 序列化的类
    """
    def to_dict(self):
        lst = []
        for card in self.data_list:
            lst.append(
                {
                    "cardId": card.bankInfoId,
                    "cardNum": card.bankCardNum,
                    "bankName": card.openingBank
                }
            )
        return lst